﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Discuz.Toolkit;
using DNTAddNETSNS;

public partial class _Default : System.Web.UI.Page
{
    DiscuzSession ds;

    protected void Page_Load(object sender, EventArgs e)
    {
        ds = ConformityHandler.InitDiscuzSession();

        if (Request.Cookies["dnt"] == null)
        {
        }

    }
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        int DntUid = ds.GetUserID("silverage");
        ds.Login(DntUid, "silverage", false, 100, ConfigurationManager.AppSettings["domainName"].ToString());
        //Response.Redirect("SessionCreater.aspx?next=default");
    }
    protected void btnLogoff_Click(object sender, EventArgs e)
    {
        ds.Logout("");
        ds.session_info = null;
        Session["AuthToken"] = null;
    }
    protected void btnRegister_Click(object sender, EventArgs e)
    {
        int num = (new Random()).Next(1, 100);
        ds.Register("silverage" + num, "silverage", "silverage" + num + "@gmail.com", false);
    }
}